{% extends "base.html" %}

{% block title %}Admin - Flask Blueprints Demo{% endblock %}

{% block content %}
<h2>Admin Section</h2>

<ul class="nav nav-tabs mb-4">
    <li class="nav-item">
        <a class="nav-link {% if request.endpoint == 'admin.dashboard' %}active{% endif %}" 
           href="{{ url_for('admin.dashboard') }}">Dashboard</a>
    </li>
    <li class="nav-item">
        <a class="nav-link {% if request.endpoint == 'admin.users' %}active{% endif %}" 
           href="{{ url_for('admin.users') }}">Users</a>
    </li>
    <li class="nav-item">
        <a class="nav-link {% if request.endpoint == 'admin.posts' %}active{% endif %}" 
           href="{{ url_for('admin.posts') }}">Posts</a>
    </li>
    <li class="nav-item">
        <a class="nav-link {% if request.endpoint == 'admin.settings' %}active{% endif %}" 
           href="{{ url_for('admin.settings') }}">Settings</a>
    </li>
</ul>

{% block admin_content %}{% endblock %}

<div class="mt-4">
    <a href="{{ url_for('main.index') }}" class="btn btn-secondary">Back to Home</a>
</div>
{% endblock %}